'use strict';
module.exports =  async({collection,params,token,uniID})=>{
	let res = {}
	let payload = await uniID.checkToken(token)
	if(payload.code == 0){
		let id = params._id
		delete params._id
		res = await collection.doc(id).update(params)
		res = {...res,code:0,msg:'更新成功'}
	}else{
		res = payload
	}
	//返回数据给客户端
	return res
}